package com.jianyitech.asr.kafka.producer;
import com.alibaba.fastjson.JSON;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.kafka.core.KafkaTemplate;
import org.springframework.stereotype.Service;
import org.springframework.util.concurrent.ListenableFuture;

import java.util.concurrent.ExecutionException;

@Service
public class ProducerService {

    @Autowired
    KafkaTemplate<String,String> kafkaTemplate;

    /**
     * 发送消息
     * @param topic
     * @param message
     */
    public void sendMessage(String topic,String message){
       kafkaTemplate.send(topic,message);
    }







}
